package dcx.map
{
	import com.dcx.game.component.loading.URLLoaderItem;
	import com.dcx.game.component.ui.ViewComponet;
	import com.friendsofed.isometric.DrawnIsoTile;
	import com.friendsofed.isometric.Point3D;
	
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class BaseMap extends ViewComponet
	{
		private var id:int;
		private var floor:Sprite;
		private var gridContainer:Sprite;
		private var world:Sprite;
		
		protected var staticData:MapStaticData= new MapStaticData();
		public function BaseMap()
		{
			floor = new Sprite();
			addChild(floor);
			
			gridContainer = new Sprite();
			addChild(gridContainer);
			
			world = new Sprite();
			addChild(world);
		}
		public function getStaticData():MapStaticData
		{
			return staticData;
		}
		protected function createGrids():void
		{
			for(var i:int = 0; i < staticData.cols; i++)
			{
				for(var j:int = 0; j < staticData.rows; j++)
				{
					var tile:DrawnIsoTile = new DrawnIsoTile(staticData.size, 0xcccccc);
					tile.position = new Point3D(i * staticData.size, 0, j * staticData.size);
					gridContainer.addChild(tile);
				}
			}
		}

	}
}